import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-06-17
 * Time: 15:27
 */
class A{
    private int i;
    public A(int i) {
        this.i = i;
    }
    private void f(){};
    private void g(){};
}
class B extends A{

    private void f(){};
    private void g(){};
    private final int i = 0;
    private final int j;//Blank final
    private final A a;//Blank final reference;
    B(int i){
        super(i);
        j = 10;
        a = new A(j);
    }
}
class C extends B{
    public void f(){
        System.out.println("C f method");
    };
    public void g(){
        System.out.println("C g method");
    }
    C(int i) {
        super(i);
    }
}
class A1{
    final void f(){
        System.out.println("A1 method");
    }
}
class B1 extends A1{
}
final class A2{
    public int i = 1;
    void f(){};
}
//class B2 extends A2{}
public class Test {
    public static void bubbleSort(int[] nums){
        int n = nums.length-1;
        for (int i = 0; i < n ; i++) {
            boolean flg = false;
            for (int j = 0; j < n - i ; j++) {
                if(nums[j] > nums[j+1]){
                    int tmp = nums[j];
                    nums[j] = nums[j+1];
                    nums[j+1] = tmp;
                    flg = true;
                }
                if( flg == false){
                    break;
                }
            }
        }
    }
    public static void main(String[] args) {
        int[] nums = {7,4,2,1,5,3};
        bubbleSort(nums);
        System.out.println(Arrays.toString(nums));
        C c = new C(10);
        c.g();
        c.f();
        B b = c;
//        b.f();
//        b.g();
        A a = c;
//        a.f();
//        a.g();
    }
}
